program HoD;

{%ToDo 'HoD.todo'}

uses
  uLostMemory in 'Includes\uLostMemory.pas',
  Windows,
  Forms,
  uGUIBorder in 'Includes\uGUIBorder.pas',
  uMain in 'uMain.pas' {fMain},
  uGUI in 'Includes\uGUI.pas',
  uSCR in 'Includes\uSCR.pas',
  uActors in 'Includes\uActors.pas',
  uMap in 'Includes\uMap.pas',
  uScript in 'Includes\uScript.pas',
  uBox in 'Includes\uBox.pas',
  uAlerts in 'Includes\uAlerts.pas',
  uCursors in 'Includes\uCursors.pas',
  uLog in 'Includes\uLog.pas',
  Bass in 'Includes\Bass.pas',
  uConf in 'Includes\uConf.pas',
  uSounds in 'Includes\uSounds.pas',
  uInvBox in 'Includes\uInvBox.pas',
  uUtils in '..\common\uUtils.pas',
  PCImage in 'Includes\PCImage.pas',
  uEffects in 'Includes\uEffects.pas',
  uIni in 'Includes\uIni.pas',
  uMapGen in 'Includes\uMapGen.pas',
  uAdvStr in 'Includes\uAdvStr.pas',
  uSaveLoad in 'Includes\uSaveLoad.pas',
  GIFImage in 'Includes\GIFImage\GIFImage.pas',
  PNGExtra in 'Includes\PNGImage\PNGExtra.pas',
  PNGImage in 'Includes\PNGImage\PNGImage.pas',
  PNGLang in 'Includes\PNGImage\PNGLang.pas',
  ZLibPas in 'Includes\PNGImage\ZLibPas.pas',
  uMsg in 'Includes\uMsg.pas',
  uSkillBox in 'Includes\uSkillBox.pas',
  uStrUtils in 'Includes\uStrUtils.pas',
  Affixes in '..\common\Affixes.pas',
  uColors in 'Includes\uColors.pas',
  uResFont in 'Includes\uResFont.pas',
  uFog in 'Includes\uFog.pas',
  uItemBonus in 'Includes\uItemBonus.pas',
  PathFind in 'Includes\PathFind.pas',
  UTileMask in '..\common\UTileMask.pas',
  uInput in 'Console\uInput.pas' {fInput},
  uConsole in 'Console\uConsole.pas' {fConsole},
  UMapCommon in '..\common\UMapCommon.pas',
  UConfig in '..\common\UConfig.pas',
  UNPC in '..\common\UNPC.pas',
  USigns in '..\common\USigns.Pas',
  UCommon in '..\common\UCommon.pas',
  uGraph in 'Includes\uGraph.pas',
  uButton in 'Includes\uButton.pas',
  uImage in 'Includes\uImage.pas',
  uScene in 'Includes\uScene.pas',
  uHint in 'Includes\uHint.pas',
  uSceneDialog in 'Scenes\uSceneDialog.pas',
  uSceneAbout in 'Scenes\uSceneAbout.pas',
  uSceneLoad in 'Scenes\uSceneLoad.pas',
  uSceneMenu in 'Scenes\uSceneMenu.pas',
  uSceneSellect in 'Scenes\uSceneSellect.pas',
  uSceneRace in 'Scenes\uSceneRace.pas',
  uSceneStat in 'Scenes\uSceneStat.pas',
  uSceneGame in 'Scenes\uSceneGame.pas',
  uSceneInv in 'Scenes\uSceneInv.pas',
  uSceneChar in 'Scenes\uSceneChar.pas',
  uSceneQuest in 'Scenes\uSceneQuest.pas',
  uSceneHelp in 'Scenes\uSceneHelp.pas',
  uSceneCraft in 'Scenes\uSceneCraft.pas',
  uSceneTrade in 'Scenes\uSceneTrade.pas',
  uSceneSkill in 'Scenes\uSceneSkill.pas',
  uSkill in 'Includes\uSkill.pas',
  UItems in '..\common\UItems.pas',
  uTest in 'Includes\uTest.pas',
  uServer in 'Includes\uServer.pas',
  uRumours in 'Includes\uRumours.pas',
  uBar in 'Includes\uBar.pas',
  uFovHeader in 'Includes\UfovHeader.pas',
  uSceneConfig in 'Scenes\uSceneConfig.pas',
  uLang in 'Includes\uLang.pas',
  uSceneDelChar in 'Scenes\uSceneDelChar.pas',
  uSkillTree in 'Includes\uSkillTree.pas',
  uBearLibMG in '..\BeaRLibMG\uBeaRLibMG.pas',
  uMapGenerator in '..\BeaRLibMG\uMapGenerator.pas',
  uSceneGold in 'Scenes\uSceneGold.pas',
  uVars in '..\Common\uVars.pas',
  uTimeVars in '..\Common\uTimeVars.pas',
  Audio in 'Includes\Audio.pas',
  uMusicMenu in 'Includes\uMusicMenu.pas',
  uSceneClass in 'Scenes\uSceneClass.pas',
  uBeaRLibZip in '..\BeaRlibZip\uBeaRlibZip.pas',
  uAdvMap in '..\common\uAdvMap.pas',
  Ammunition in '..\common\Ammunition.pas';

{$R *.res}

var
  UniqueMapping: THandle;

begin
  UniqueMapping := CreateFileMapping($ffffffff,
    nil, PAGE_READONLY, 0, 32, 'HeartOfDarkness');
  if UniqueMapping = 0 then Halt else
    if GetLastError = ERROR_ALREADY_EXISTS then Halt;

  {$IF COMPILERVERSION >= 18}
  ReportMemoryLeaksOnShutdown := True;
  Application.MainFormOnTaskBar := True;
  {$IFEND}
  Application.Initialize;
  Application.CreateForm(TfMain, fMain);
  Application.CreateForm(TfInput, fInput);
  Application.CreateForm(TfConsole, fConsole);
  Application.Run;
end.

